import {getSysTime} from '@/api/common'
const sysTime = {
  state: {
    time: '2020-01-08 00:00:00'
  },
  mutations: {
    saveSysTime(state, time) {
      if (time) {
        state.time = time;
      }
    },
  },
  actions:{
    getSysTime({commit}){
      getSysTime().then(res=>{
        commit('saveSysTime',res.body);
      })
    },
  }
}
export default sysTime
